package com.buglife.video.convert.service.imp;

import java.io.File;

import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import com.buglife.video.convert.service.IVideoUploadService;
import com.buglife.video.convert.util.FileParameter;
import com.buglife.video.convert.util.Upload;

@Service
public class UploadVideoService implements IVideoUploadService{

    @Override
    public void uploadVideo(MultipartFile file) {
        String filename = file.getOriginalFilename();
        File video = new File(FileParameter.VIDEO_PATH);
        Upload.uploadFile(file, video, filename);
    }
    
}
